package com.shelpe.services.sinbad.repository.jpa;

import java.util.Date;
import java.util.List;

import org.springframework.data.repository.PagingAndSortingRepository;

import com.shelpe.services.sinbad.entity.jpa.TargetTag;
import com.shelpe.services.sinbad.entity.jpa.TargetTag.TargetTagPK;

public interface TargetTagRepository extends PagingAndSortingRepository<TargetTag, TargetTagPK> {

	List<TargetTag> findByAdgroupIDAndDateBetweenAndSource(long adgroupID, Date start, Date end, int source);

	List<TargetTag> findByAdgroupIDAndDateBetweenAndSourceIn(long adgroupID, Date fromDate, Date toDate,
			List<Integer> sources);

	List<TargetTag> findByAdgroupIDAndSourceAndDateAfterOrderByDateDesc(long adgroupID, int source, Date date);

	List<TargetTag> findByAdgroupIDAndSourceInAndDateAfterOrderByDateDesc(long adgroupID, List<Integer> sources,
			Date date);
}
